home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / catn / toplevel.n < prev    next >
Encoding:
Text File  |  1994-09-20  |  4.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. toplevel(n)                Tk Commands
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      toplevel - Create and manipulate toplevel widgets
  12.  
  13. SYNOPSIS
  14.      toplevel _p_a_t_h_N_a_m_e ?-screen  _s_c_r_e_e_n_N_a_m_e?  ?-class  _c_l_a_s_s_N_a_m_e?
  15.      ?_o_p_t_i_o_n_s?
  16.  
  17. STANDARD OPTIONS
  18.      background      geometry
  19.      borderWidth     relief
  20.  
  21.      See the ``options'' manual entry for details on the standard
  22.      options.
  23.  
  24. WIDGET-SPECIFIC OPTIONS
  25. _________________________________________________________________
  26.  
  27.  
  28. DESCRIPTION
  29.      The toplevel command creates a new toplevel widget (given by
  30.      the   _p_a_t_h_N_a_m_e  argument).   Additional  options,  described
  31.      above, may be specified on the command line or in the option
  32.      database  to  configure  aspects of the toplevel such as its
  33.      background color and relief.  The toplevel  command  returns
  34.      the path name of the new window.
  35.  
  36.      A toplevel is similar to a frame except that it  is  created
  37.      as a top-level window:  its X parent is the root window of a
  38.      screen rather than the logical parent from  its  path  name.
  39.      The primary purpose of a toplevel is to serve as a container
  40.      for dialog boxes and other collections of widgets.  The only
  41.      features  of  a  toplevel  are  its  background color and an
  42.      optional 3-D border to make the toplevel  appear  raised  or
  43.      sunken.
  44.  
  45.      Two special command-line options  may  be  provided  to  the
  46.      toplevel  command:  -class and -screen.  If -class is speci-
  47.      fied, then the new widget's class will be set  to  _c_l_a_s_s_N_a_m_e
  48.      instead  of  Toplevel.   Changing  the  class  of a toplevel
  49.      widget may be useful in order to use a special class name in
  50.      database  options referring to this widget and its children.
  51.      The -screen option may be used to place the window on a dif-
  52.      ferent  screen  than the window's logical parent.  Any valid
  53.      screen name may be used, even one  associated  with  a  dif-
  54.      ferent display.
  55.  
  56.      Note:  -class and -screen are handled differently than other
  57.      command-line  options.   They may not be specified using the
  58.      option database (these  options  must  have  been  processed
  59.      before  the  new  window  has been created enough to use the
  60.  
  61.  
  62.  
  63. Tk                                                              1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. toplevel(n)                Tk Commands
  71.  
  72.  
  73.  
  74.      option database; in particular,  the  new  class  name  will
  75.      affect the lookup of options in the database).  In addition,
  76.      -class and -screen may not be queried or changed  using  the
  77.      config  command  described  below.  However, the winfo class
  78.      command may be used to query the  class  of  a  window,  and
  79.      winfo screen may be used to query its screen.
  80.  
  81.  
  82. WIDGET COMMAND
  83.      The toplevel command creates a new Tcl command whose name is
  84.      the  same  as  the path name of the toplevel's window.  This
  85.      command may be used to  invoke  various  operations  on  the
  86.      widget.  It has the following general form:
  87.  
  88.           _p_a_t_h_N_a_m_e _o_p_t_i_o_n ?_a_r_g _a_r_g ...?
  89.  
  90.      _P_a_t_h_N_a_m_e is the name of the command, which is  the  same  as
  91.      the toplevel widget's path name.  _O_p_t_i_o_n and the _a_r_gs deter-
  92.      mine the exact behavior of the command.  The following  com-
  93.      mands are possible for toplevel widgets:
  94.  
  95.      _p_a_t_h_N_a_m_e configure ?_o_p_t_i_o_n? ?_v_a_l_u_e _o_p_t_i_o_n _v_a_l_u_e ...?
  96.           Query  or  modify  the  configuration  options  of  the
  97.           widget.   If  no  _o_p_t_i_o_n  is  specified, returns a list
  98.           describing all of the available  options  for  _p_a_t_h_N_a_m_e
  99.           (see  Tk_ConfigureInfo for information on the format of
  100.           this list).  If _o_p_t_i_o_n is specified with no _v_a_l_u_e, then
  101.           the  command  returns  a  list describing the one named
  102.           option (this list will be identical to the  correspond-
  103.           ing  sublist  of  the  value  returned  if no _o_p_t_i_o_n is
  104.           specified).  If one  or  more  _o_p_t_i_o_n-_v_a_l_u_e  pairs  are
  105.           specified,  then  the command modifies the given widget
  106.           option(s) to have the given value(s);  in this case the
  107.           command  returns  an empty string.  _O_p_t_i_o_n may have any
  108.           of the values accepted by the toplevel command.
  109.  
  110.  
  111. BINDINGS
  112.      When a new toplevel is created,  it  has  no  default  event
  113.      bindings: toplevels are not intended to be interactive.
  114.  
  115.  
  116. KEYWORDS
  117.      toplevel, widget
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Tk                                                              2
  130.  
  131.  
  132.  
  133.